<%--
  Created by IntelliJ IDEA.
  User: Admin
  Date: 2017/6/5
  Time: 15:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title></title>
</head>
<body>
<%
    if (session.getAttribute("user") == null) {
        System.out.println("用户登录");
        String username = request.getParameter("userAccount");
        session.setAttribute("user", username);
        response.sendRedirect("../resources/privateIndex.jsp");
    } else {
        session.removeAttribute("user");
        System.out.println("用户注销");
        response.sendRedirect("../resources/index.jsp");
    }
%>

</body>
</html>
